home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / i / internet / software / doku / readme.pkd < prev    next >
Encoding:
Text File  |  1996-01-08  |  3.9 KB  |  113 lines

  1. INFOS TO BUILD PKTDRV.PRG
  2. =========================
  3.  
  4. 256 bytes stack are sufficient for this version (RIEBL CARD PLUS).
  5. Turn off stack-checking.
  6.  
  7. I used PURE-C to develop this driver, see the .prj file how to link all
  8. objects.
  9.  
  10. PKTDRV.PRG adds a cookie named '_PKT', its value is a pointer to
  11. a jumptable. All functions use the PURE-C register parameter passing
  12. convention, that is, integer types in D0,D1 , pointers in A0,A1 
  13. from first parameter to last respectively.
  14.  
  15. Supported functions are:
  16.  
  17. int net_info(int length_of_buffer, char *buffer);
  18.  
  19. Gives information about traffic on the node.
  20. ( This function is not developed to its final state and is subject to
  21. change in the future)
  22. Return: negative errorcode or length of copied data.
  23.  
  24. int net_open(int protocol, int (*handler)(int length,char *pkt));
  25.  
  26. Tells the driver the address of a packet handler, which wants to
  27. receive packets of a specific ethernet protocol. Up to 5 different
  28. protocols are allowed at the moment (only 2 (ARP and IP) are used by 
  29. our apps)
  30. Return: negative errorcode or 0 if succesful.
  31.  
  32. The protocol-handler function gets the length (in D0) and the address
  33. (in A0) of a newly arrived packet. If the handler accepts the packet
  34. it returns a nonzero value, otherwise it returns zero and the packet 
  35. driver discards the packet. Accepted packets must be freed using
  36. net_pktfree after processing. The protocol-handler runs on interrupt
  37. level, therefore no stack-checking is allowed
  38.  
  39. int net_release(int protocol);
  40.  
  41. Removes a protocol from the protocoltable. Any further incoming
  42. packets of this protocol are discarded by the packet driver.
  43. Return: negative errorcode or 0 if successful.
  44.  
  45. int net_send(int length, char *pkt);
  46.  
  47. Send a packet. The packet is sent as it is, any headers (inclusive 
  48. ethernet header) must be filled by the caller. This function waits
  49. until the packet is sent or a error is returned from the chip.
  50. Only packets allocated by net_pktalloc or got from the protocol-
  51. upcall should be handed to this function.
  52. Return: negative errorcode or length of sent packet, if successful.
  53.  
  54. (Note: The length of the sent packet may be greater than the original
  55. packet, since the minimum length of a ethernet packet is 60 bytes).
  56.  
  57. int net_getadr(int length_of_buffer,char *addr_buffer);
  58.  
  59. Fills addr_buffer with the local hardware address.
  60. Return: number of copied bytes or negative errorcode
  61.  
  62. int net_reset(void);
  63.  
  64. Reset the packet driver to a state like after startup, any active
  65. protocol is aborted.
  66. Return: 0 if successful or negative errorcode
  67.  
  68. PKTBUF *net_pktalloc(u_short length_of_packet);
  69.  
  70. Allocates a block of memory to hold a packet. If the interface
  71. provides onboard memory, it is strongly recommended to allocate
  72. this block onboard to avoid unneccessary copying of data.
  73. Return: pointer to new allocated packet or NULL if out of mem.
  74.  
  75. int net_pktfree(PKTBUF *);
  76.  
  77. Free a packet allocated by net_pktalloc or handed by the protocol-
  78. handler upcall.
  79. Return: 0 if successful or negative errorcode.
  80.  
  81. Indices to the jumptable are provided in pktdrv.h
  82.  
  83. Any suggestions would be appreciated.
  84.  
  85.  
  86.     Hans Wieser
  87.  
  88.  
  89. ---
  90.  
  91. Support for other Ethernet cards:
  92. ---------------------------------
  93.  
  94. The packet driver forms the interface to any Ethernet card applied to
  95. your ATARI. So if you would like to use any other card than the
  96. RIEBL card you simply have to change this program.
  97. We did this for a Dlink DE600 pocket adaptor usually fitted to the
  98. parallel port of an IBM-PC. Since the ATARI does not provide all
  99. of the required signals on its parallel port, we did some simple
  100. interface hardware for the cartridge port. The file "adaptor.img"
  101. shows the principle of this piece. The packet driver for the DE600
  102. you can find in the file "dlinkdrv.prg".
  103. The file "newadapt.img" is the latest circuit drawing of our adapter.
  104. As the ATARI has no interrupt input on the cartridge port, we use
  105. the BUSY-line of the printer port (Not neccessary - only boosts performance). 
  106. The sources for packet drivers are provided in pktdrv/pktdlink and
  107. pktdrv/pktlance.
  108.  
  109.  
  110.     Peter Mayer
  111.  
  112.  
  113.